home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.metal;
-
- import com.sun.java.swing.Icon;
- import java.awt.Dimension;
- import java.io.Serializable;
-
- public class MetalIconFactory implements Serializable {
- private static Icon fileChooserDetailViewIcon;
- private static Icon fileChooserHomeFolderIcon;
- private static Icon fileChooserListViewIcon;
- private static Icon fileChooserNewFolderIcon;
- private static Icon fileChooserUpFolderIcon;
- private static Icon internalFrameAltMaximizeIcon;
- private static Icon internalFrameCloseIcon;
- private static Icon internalFrameDefaultMenuIcon;
- private static Icon internalFrameMaximizeIcon;
- private static Icon internalFrameMinimizeIcon;
- private static Icon radioButtonIcon;
- private static Icon treeComputerIcon;
- private static Icon treeFloppyDriveIcon;
- private static Icon treeFolderIcon;
- private static Icon treeHardDriveIcon;
- private static Icon treeLeafIcon;
- private static Icon treeDarkControlIcon;
- private static Icon treeLightControlIcon;
- private static Icon menuArrowIcon;
- private static Icon menuItemCheckIcon;
- private static Icon menuItemArrowIcon;
- private static Icon checkBoxMenuItemIcon;
- private static Icon radioButtonMenuItemIcon;
- public static final boolean DARK = false;
- public static final boolean LIGHT = true;
- private static final Dimension folderIcon16Size = new Dimension(16, 16);
- private static final Dimension fileIcon16Size = new Dimension(16, 16);
- private static final Dimension treeControlSize = new Dimension(8, 8);
- private static final Dimension menuArrowIconSize = new Dimension(4, 8);
- private static final Dimension menuCheckIconSize = new Dimension(12, 10);
- private static final int xOff = 4;
-
- public static Icon getCheckBoxMenuItemIcon() {
- if (checkBoxMenuItemIcon == null) {
- checkBoxMenuItemIcon = new CheckBoxMenuItemIcon();
- }
-
- return checkBoxMenuItemIcon;
- }
-
- public static Icon getFileChooserDetailViewIcon() {
- if (fileChooserDetailViewIcon == null) {
- fileChooserDetailViewIcon = new FileChooserDetailViewIcon();
- }
-
- return fileChooserDetailViewIcon;
- }
-
- public static Icon getFileChooserHomeFolderIcon() {
- if (fileChooserHomeFolderIcon == null) {
- fileChooserHomeFolderIcon = new FileChooserHomeFolderIcon();
- }
-
- return fileChooserHomeFolderIcon;
- }
-
- public static Icon getFileChooserListViewIcon() {
- if (fileChooserListViewIcon == null) {
- fileChooserListViewIcon = new FileChooserListViewIcon();
- }
-
- return fileChooserListViewIcon;
- }
-
- public static Icon getFileChooserNewFolderIcon() {
- if (fileChooserNewFolderIcon == null) {
- fileChooserNewFolderIcon = new FileChooserNewFolderIcon();
- }
-
- return fileChooserNewFolderIcon;
- }
-
- public static Icon getFileChooserUpFolderIcon() {
- if (fileChooserUpFolderIcon == null) {
- fileChooserUpFolderIcon = new FileChooserUpFolderIcon();
- }
-
- return fileChooserUpFolderIcon;
- }
-
- public static Icon getHorizontalSliderThumbIcon() {
- return new HorizontalSliderThumbIcon();
- }
-
- public static Icon getInternalFrameAltMaximizeIcon(int size) {
- return new InternalFrameAltMaximizeIcon(size);
- }
-
- public static Icon getInternalFrameCloseIcon(int size) {
- return new InternalFrameCloseIcon(size);
- }
-
- public static Icon getInternalFrameDefaultMenuIcon() {
- if (internalFrameDefaultMenuIcon == null) {
- internalFrameDefaultMenuIcon = new InternalFrameDefaultMenuIcon();
- }
-
- return internalFrameDefaultMenuIcon;
- }
-
- public static Icon getInternalFrameMaximizeIcon(int size) {
- return new InternalFrameMaximizeIcon(size);
- }
-
- public static Icon getInternalFrameMinimizeIcon(int size) {
- return new InternalFrameMinimizeIcon(size);
- }
-
- public static Icon getMenuArrowIcon() {
- if (menuArrowIcon == null) {
- menuArrowIcon = new MenuArrowIcon();
- }
-
- return menuArrowIcon;
- }
-
- public static Icon getMenuItemArrowIcon() {
- if (menuItemArrowIcon == null) {
- menuItemArrowIcon = new MenuItemArrowIcon();
- }
-
- return menuItemArrowIcon;
- }
-
- public static Icon getMenuItemCheckIcon() {
- if (menuItemCheckIcon == null) {
- menuItemCheckIcon = new MenuItemCheckIcon();
- }
-
- return menuItemCheckIcon;
- }
-
- public static Icon getRadioButtonIcon() {
- if (radioButtonIcon == null) {
- radioButtonIcon = new RadioButtonIcon();
- }
-
- return radioButtonIcon;
- }
-
- public static Icon getRadioButtonMenuItemIcon() {
- if (radioButtonMenuItemIcon == null) {
- radioButtonMenuItemIcon = new RadioButtonMenuItemIcon();
- }
-
- return radioButtonMenuItemIcon;
- }
-
- public static Icon getTreeComputerIcon() {
- if (treeComputerIcon == null) {
- treeComputerIcon = new TreeComputerIcon();
- }
-
- return treeComputerIcon;
- }
-
- public static Icon getTreeControlIcon(boolean isLight) {
- if (isLight) {
- if (treeLightControlIcon == null) {
- treeLightControlIcon = new TreeControlIcon(true);
- }
-
- return treeLightControlIcon;
- } else {
- if (treeDarkControlIcon == null) {
- treeDarkControlIcon = new TreeControlIcon(false);
- }
-
- return treeDarkControlIcon;
- }
- }
-
- public static Icon getTreeFloppyDriveIcon() {
- if (treeFloppyDriveIcon == null) {
- treeFloppyDriveIcon = new TreeFloppyDriveIcon();
- }
-
- return treeFloppyDriveIcon;
- }
-
- public static Icon getTreeFolderIcon() {
- if (treeFolderIcon == null) {
- treeFolderIcon = new TreeFolderIcon();
- }
-
- return treeFolderIcon;
- }
-
- public static Icon getTreeHardDriveIcon() {
- if (treeHardDriveIcon == null) {
- treeHardDriveIcon = new TreeHardDriveIcon();
- }
-
- return treeHardDriveIcon;
- }
-
- public static Icon getTreeLeafIcon() {
- if (treeLeafIcon == null) {
- treeLeafIcon = new TreeLeafIcon();
- }
-
- return treeLeafIcon;
- }
-
- public static Icon getVerticalSliderThumbIcon() {
- return new VerticalSliderThumbIcon();
- }
-
- static Dimension access$folderIcon16Size() {
- return folderIcon16Size;
- }
-
- static Dimension access$treeControlSize() {
- return treeControlSize;
- }
-
- static Dimension access$menuArrowIconSize() {
- return menuArrowIconSize;
- }
-
- static Dimension access$menuCheckIconSize() {
- return menuCheckIconSize;
- }
-
- static Dimension access$fileIcon16Size() {
- return fileIcon16Size;
- }
- }
-